package com.greenhouse.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.greenhouse.business.domain.BizCameraManage;
import com.greenhouse.business.mapper.BizCameraManageMapper;
import com.greenhouse.business.service.IBizCameraManageService;
import com.greenhouse.common.utils.DateUtils;

/**
 * 监测设备管理Service业务层处理
 * 
 * @author greenhouse
 * @date 2021-05-13
 */
@Service
public class BizCameraManageServiceImpl implements IBizCameraManageService {
	@Autowired
	private BizCameraManageMapper bizCameraManageMapper;

	/**
	 * 查询监测设备管理
	 * 
	 * @param id 监测设备管理ID
	 * @return 监测设备管理
	 */
	@Override
	public BizCameraManage selectBizCameraManageById(Long id) {
		return bizCameraManageMapper.selectBizCameraManageById(id);
	}

	/**
	 * 查询监测设备管理列表
	 * 
	 * @param bizCameraManage 监测设备管理
	 * @return 监测设备管理
	 */
	@Override
	public List<BizCameraManage> selectBizCameraManageList(BizCameraManage bizCameraManage) {
		return bizCameraManageMapper.selectBizCameraManageList(bizCameraManage);
	}

	/**
	 * 新增监测设备管理
	 * 
	 * @param bizCameraManage 监测设备管理
	 * @return 结果
	 */
	@Override
	public int insertBizCameraManage(BizCameraManage bizCameraManage) {
		bizCameraManage.setCreateTime(DateUtils.getNowDate());
		return bizCameraManageMapper.insertBizCameraManage(bizCameraManage);
	}

	/**
	 * 修改监测设备管理
	 * 
	 * @param bizCameraManage 监测设备管理
	 * @return 结果
	 */
	@Override
	public int updateBizCameraManage(BizCameraManage bizCameraManage) {
		bizCameraManage.setUpdateTime(DateUtils.getNowDate());
		return bizCameraManageMapper.updateBizCameraManage(bizCameraManage);
	}

	/**
	 * 批量删除监测设备管理
	 * 
	 * @param ids 需要删除的监测设备管理ID
	 * @return 结果
	 */
	@Override
	public int deleteBizCameraManageByIds(Long[] ids) {
		return bizCameraManageMapper.deleteBizCameraManageByIds(ids);
	}

	/**
	 * 删除监测设备管理信息
	 * 
	 * @param id 监测设备管理ID
	 * @return 结果
	 */
	@Override
	public int deleteBizCameraManageById(Long id) {
		return bizCameraManageMapper.deleteBizCameraManageById(id);
	}
}
